﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Data;
using System.Data.SqlClient;
using System.Text.RegularExpressions;
using Defecter.Gui.Access;
using DefectDBTypes;
using System.IO;



namespace Defector
{
    /// <summary>
    /// Interaction logic for Login.xaml
    /// </summary>
    public partial class Configure : Window
    {
        public Configure()
        {
            InitializeComponent();
        }



        private void cancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void savebtn_Click(object sender, RoutedEventArgs e)
        {
            String server = serverInput.Text;
            String database = databaseInput.Text;
            String username = usernameInput.Text;
            String password = passwordInput.Password;
            TextWriter tw = new StreamWriter("Configuration.txt");
            tw.WriteLine(server);
            tw.WriteLine(database);
            tw.WriteLine(username);
            tw.WriteLine(password);
            tw.Close();
            this.Close();
        }




    }
}
